<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<ui:composition>
	<p:tab title="Plane Selection">
		<h:outputLabel value="This is where the plane table will be" />
		<h:panelGrid>
			<h:dataTable id="offerTable" border="2"
				value="#{planeView.planeDTOList}" var="list">

				<h:column>
					<f:facet name="planeCompany">Company</f:facet>
    				#{list.company}
    			</h:column>

				<h:column>
					<f:facet name="planeCityFrom">City From</f:facet>
    				#{list.from}
    			</h:column>

				<h:column>
					<f:facet name="planeCityTo">City To</f:facet>
    				#{list.to}
    			</h:column>

				<h:column>
					<f:facet name="planeDepartStart">Depart Start</f:facet>
    				#{list.departStart}
    			</h:column>

				<h:column>
					<f:facet name="planeDepartEnd">Depart End</f:facet>
    				#{list.departEnd}
    			</h:column>
    			
    			<h:column>
					<f:facet name="planeReturnStart">Return Start</f:facet>
    				#{list.returnStart}
    			</h:column>

				<h:column>
					<f:facet name="planeReturnEnd">Return End</f:facet>
    				#{list.returnEnd}
    			</h:column>
    			
    			<h:column>
					<f:facet name="planePrice">Price</f:facet>
    				#{list.price}
    			</h:column>

			</h:dataTable>
		</h:panelGrid>
		
		<h:commandButton id="update" value="Update">
			<f:ajax event="click" update="offerTable" listener="#{planeView.populateOfferTable}"/>
		</h:commandButton>
	</p:tab>
</ui:composition>
</html>